package com.xpertline.ui.food;

import java.awt.EventQueue;

import javax.swing.JDialog;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import java.awt.Insets;
import javax.swing.JButton;
import java.awt.FlowLayout;
import javax.swing.JLabel;
import java.awt.Component;
import javax.swing.Box;
import java.awt.Dimension;
import javax.swing.JTextField;
import javax.swing.JComboBox;
import javax.swing.JTextArea;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import javax.swing.JScrollPane;
import javax.swing.JCheckBox;

public class EditFoodDialog extends JDialog {
	private JTextField textField;
	private JTextField textField_1;
	private JTable table;
	private JTextField textField_2;
	private JTextField textField_3;
	private JTextField textField_4;
	private JTextField textField_5;
	private JTextField textField_6;
	private JTextField textField_7;
	private JTextField textField_8;
	private JTextField textField_9;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					EditFoodDialog dialog = new EditFoodDialog();
					dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
					dialog.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the dialog.
	 */
	public EditFoodDialog() {
		setBounds(100, 100, 821, 492);
		
		JPanel panel = new JPanel();
		getContentPane().add(panel, BorderLayout.NORTH);
		GridBagLayout gbl_panel = new GridBagLayout();
		gbl_panel.columnWidths = new int[]{0, 0, 0};
		gbl_panel.rowHeights = new int[]{0, 0, 0};
		gbl_panel.columnWeights = new double[]{0.0, 0.0, Double.MIN_VALUE};
		gbl_panel.rowWeights = new double[]{1.0, 1.0, Double.MIN_VALUE};
		panel.setLayout(gbl_panel);
		
		JPanel panel_1 = new JPanel();
		FlowLayout flowLayout = (FlowLayout) panel_1.getLayout();
		flowLayout.setAlignment(FlowLayout.LEFT);
		GridBagConstraints gbc_panel_1 = new GridBagConstraints();
		gbc_panel_1.weightx = 0.5;
		gbc_panel_1.insets = new Insets(0, 0, 5, 0);
		gbc_panel_1.fill = GridBagConstraints.BOTH;
		gbc_panel_1.gridx = 0;
		gbc_panel_1.gridy = 0;
		panel.add(panel_1, gbc_panel_1);
		
		JButton btnNewButton = new JButton("|<");
		btnNewButton.setPreferredSize(new Dimension(90, 25));
		panel_1.add(btnNewButton);
		
		JButton btnNewButton_1 = new JButton("<");
		btnNewButton_1.setPreferredSize(new Dimension(90, 25));
		panel_1.add(btnNewButton_1);
		
		JButton btnNewButton_2 = new JButton(">");
		btnNewButton_2.setPreferredSize(new Dimension(90, 25));
		panel_1.add(btnNewButton_2);
		
		JButton btnNewButton_3 = new JButton(">|");
		btnNewButton_3.setPreferredSize(new Dimension(90, 25));
		panel_1.add(btnNewButton_3);
		
		JPanel panel_2 = new JPanel();
		FlowLayout flowLayout_1 = (FlowLayout) panel_2.getLayout();
		flowLayout_1.setAlignment(FlowLayout.RIGHT);
		GridBagConstraints gbc_panel_2 = new GridBagConstraints();
		gbc_panel_2.weightx = 0.5;
		gbc_panel_2.fill = GridBagConstraints.BOTH;
		gbc_panel_2.gridx = 1;
		gbc_panel_2.gridy = 0;
		panel.add(panel_2, gbc_panel_2);
		
		JButton btnNewButton_6 = new JButton("X\u00F3a");
		btnNewButton_6.setPreferredSize(new Dimension(90, 25));
		panel_2.add(btnNewButton_6);
		
		JButton btnNewButton_5 = new JButton("H\u1EE7y b\u1ECF");
		btnNewButton_5.setPreferredSize(new Dimension(90, 25));
		panel_2.add(btnNewButton_5);
		
		JButton btnNewButton_4 = new JButton("L\u01B0u l\u1EA1i");
		btnNewButton_4.setPreferredSize(new Dimension(90, 25));
		panel_2.add(btnNewButton_4);
		
		JPanel panel_3 = new JPanel();
		getContentPane().add(panel_3, BorderLayout.CENTER);
		GridBagLayout gbl_panel_3 = new GridBagLayout();
		gbl_panel_3.columnWidths = new int[]{0, 0, 101, 202, 209, 151, 0, 0};
		gbl_panel_3.rowHeights = new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 233, 0};
		gbl_panel_3.columnWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
		gbl_panel_3.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE};
		panel_3.setLayout(gbl_panel_3);
		
		Component rigidArea = Box.createRigidArea(new Dimension(20, 20));
		GridBagConstraints gbc_rigidArea = new GridBagConstraints();
		gbc_rigidArea.insets = new Insets(0, 0, 5, 5);
		gbc_rigidArea.gridx = 0;
		gbc_rigidArea.gridy = 0;
		panel_3.add(rigidArea, gbc_rigidArea);
		
		JLabel lblSPhng = new JLabel("M\u00E3 th\u1EE9c \u0103n");
		GridBagConstraints gbc_lblSPhng = new GridBagConstraints();
		gbc_lblSPhng.anchor = GridBagConstraints.EAST;
		gbc_lblSPhng.insets = new Insets(0, 0, 5, 5);
		gbc_lblSPhng.gridx = 1;
		gbc_lblSPhng.gridy = 1;
		panel_3.add(lblSPhng, gbc_lblSPhng);
		
		textField = new JTextField();
		GridBagConstraints gbc_textField = new GridBagConstraints();
		gbc_textField.gridwidth = 2;
		gbc_textField.fill = GridBagConstraints.HORIZONTAL;
		gbc_textField.insets = new Insets(0, 0, 5, 5);
		gbc_textField.gridx = 2;
		gbc_textField.gridy = 1;
		panel_3.add(textField, gbc_textField);
		textField.setColumns(20);
		
		JLabel lblNewLabel = new JLabel("Gi\u00E1 b\u00E1n");
		GridBagConstraints gbc_lblNewLabel = new GridBagConstraints();
		gbc_lblNewLabel.anchor = GridBagConstraints.EAST;
		gbc_lblNewLabel.insets = new Insets(0, 0, 5, 5);
		gbc_lblNewLabel.gridx = 4;
		gbc_lblNewLabel.gridy = 1;
		panel_3.add(lblNewLabel, gbc_lblNewLabel);
		
		textField_5 = new JTextField();
		GridBagConstraints gbc_textField_5 = new GridBagConstraints();
		gbc_textField_5.insets = new Insets(0, 0, 5, 5);
		gbc_textField_5.fill = GridBagConstraints.HORIZONTAL;
		gbc_textField_5.gridx = 5;
		gbc_textField_5.gridy = 1;
		panel_3.add(textField_5, gbc_textField_5);
		textField_5.setColumns(10);
		
		JLabel lblTng = new JLabel("T\u00EAn th\u1EE9c \u0103n");
		GridBagConstraints gbc_lblTng = new GridBagConstraints();
		gbc_lblTng.anchor = GridBagConstraints.EAST;
		gbc_lblTng.insets = new Insets(0, 0, 5, 5);
		gbc_lblTng.gridx = 1;
		gbc_lblTng.gridy = 2;
		panel_3.add(lblTng, gbc_lblTng);
		
		textField_2 = new JTextField();
		GridBagConstraints gbc_textField_2 = new GridBagConstraints();
		gbc_textField_2.gridwidth = 2;
		gbc_textField_2.insets = new Insets(0, 0, 5, 5);
		gbc_textField_2.fill = GridBagConstraints.HORIZONTAL;
		gbc_textField_2.gridx = 2;
		gbc_textField_2.gridy = 2;
		panel_3.add(textField_2, gbc_textField_2);
		textField_2.setColumns(10);
		
		JLabel lblGiGc = new JLabel("Gi\u00E1 g\u1ED1c");
		GridBagConstraints gbc_lblGiGc = new GridBagConstraints();
		gbc_lblGiGc.anchor = GridBagConstraints.EAST;
		gbc_lblGiGc.insets = new Insets(0, 0, 5, 5);
		gbc_lblGiGc.gridx = 4;
		gbc_lblGiGc.gridy = 2;
		panel_3.add(lblGiGc, gbc_lblGiGc);
		
		textField_6 = new JTextField();
		GridBagConstraints gbc_textField_6 = new GridBagConstraints();
		gbc_textField_6.insets = new Insets(0, 0, 5, 5);
		gbc_textField_6.fill = GridBagConstraints.HORIZONTAL;
		gbc_textField_6.gridx = 5;
		gbc_textField_6.gridy = 2;
		panel_3.add(textField_6, gbc_textField_6);
		textField_6.setColumns(10);
		
		JLabel lblScCha = new JLabel("M\u00E3 v\u1EA1ch");
		GridBagConstraints gbc_lblScCha = new GridBagConstraints();
		gbc_lblScCha.anchor = GridBagConstraints.EAST;
		gbc_lblScCha.insets = new Insets(0, 0, 5, 5);
		gbc_lblScCha.gridx = 1;
		gbc_lblScCha.gridy = 3;
		panel_3.add(lblScCha, gbc_lblScCha);
		
		textField_1 = new JTextField();
		GridBagConstraints gbc_textField_1 = new GridBagConstraints();
		gbc_textField_1.gridwidth = 2;
		gbc_textField_1.insets = new Insets(0, 0, 5, 5);
		gbc_textField_1.fill = GridBagConstraints.HORIZONTAL;
		gbc_textField_1.gridx = 2;
		gbc_textField_1.gridy = 3;
		panel_3.add(textField_1, gbc_textField_1);
		textField_1.setColumns(10);
		
		JLabel lblTnKhoTi = new JLabel("T\u1ED3n kho t\u1ED1i thi\u1EC3u");
		GridBagConstraints gbc_lblTnKhoTi = new GridBagConstraints();
		gbc_lblTnKhoTi.anchor = GridBagConstraints.EAST;
		gbc_lblTnKhoTi.insets = new Insets(0, 0, 5, 5);
		gbc_lblTnKhoTi.gridx = 4;
		gbc_lblTnKhoTi.gridy = 3;
		panel_3.add(lblTnKhoTi, gbc_lblTnKhoTi);
		
		textField_7 = new JTextField();
		GridBagConstraints gbc_textField_7 = new GridBagConstraints();
		gbc_textField_7.insets = new Insets(0, 0, 5, 5);
		gbc_textField_7.fill = GridBagConstraints.HORIZONTAL;
		gbc_textField_7.gridx = 5;
		gbc_textField_7.gridy = 3;
		panel_3.add(textField_7, gbc_textField_7);
		textField_7.setColumns(10);
		
		Component verticalStrut = Box.createVerticalStrut(20);
		GridBagConstraints gbc_verticalStrut = new GridBagConstraints();
		gbc_verticalStrut.insets = new Insets(0, 0, 5, 5);
		gbc_verticalStrut.gridx = 1;
		gbc_verticalStrut.gridy = 4;
		panel_3.add(verticalStrut, gbc_verticalStrut);
		
		JCheckBox chckbxNewCheckBox = new JCheckBox("M\u00F3n \u0103n");
		GridBagConstraints gbc_chckbxNewCheckBox = new GridBagConstraints();
		gbc_chckbxNewCheckBox.anchor = GridBagConstraints.WEST;
		gbc_chckbxNewCheckBox.insets = new Insets(0, 0, 5, 5);
		gbc_chckbxNewCheckBox.gridx = 2;
		gbc_chckbxNewCheckBox.gridy = 4;
		panel_3.add(chckbxNewCheckBox, gbc_chckbxNewCheckBox);
		
		JCheckBox chckbxNguynLiu = new JCheckBox("Nguy\u00EAn li\u1EC7u");
		GridBagConstraints gbc_chckbxNguynLiu = new GridBagConstraints();
		gbc_chckbxNguynLiu.anchor = GridBagConstraints.WEST;
		gbc_chckbxNguynLiu.insets = new Insets(0, 0, 5, 5);
		gbc_chckbxNguynLiu.gridx = 3;
		gbc_chckbxNguynLiu.gridy = 4;
		panel_3.add(chckbxNguynLiu, gbc_chckbxNguynLiu);
		
		JLabel lblTnKhou = new JLabel("T\u1ED3n kho \u0111\u1EA7u k\u00EC");
		GridBagConstraints gbc_lblTnKhou = new GridBagConstraints();
		gbc_lblTnKhou.anchor = GridBagConstraints.EAST;
		gbc_lblTnKhou.insets = new Insets(0, 0, 5, 5);
		gbc_lblTnKhou.gridx = 4;
		gbc_lblTnKhou.gridy = 4;
		panel_3.add(lblTnKhou, gbc_lblTnKhou);
		
		textField_8 = new JTextField();
		GridBagConstraints gbc_textField_8 = new GridBagConstraints();
		gbc_textField_8.insets = new Insets(0, 0, 5, 5);
		gbc_textField_8.fill = GridBagConstraints.HORIZONTAL;
		gbc_textField_8.gridx = 5;
		gbc_textField_8.gridy = 4;
		panel_3.add(textField_8, gbc_textField_8);
		textField_8.setColumns(10);
		
		JLabel lblnVTnh = new JLabel("\u0110\u01A1n v\u1ECB t\u00EDnh");
		GridBagConstraints gbc_lblnVTnh = new GridBagConstraints();
		gbc_lblnVTnh.anchor = GridBagConstraints.EAST;
		gbc_lblnVTnh.insets = new Insets(0, 0, 5, 5);
		gbc_lblnVTnh.gridx = 1;
		gbc_lblnVTnh.gridy = 5;
		panel_3.add(lblnVTnh, gbc_lblnVTnh);
		
		JComboBox comboBox = new JComboBox();
		GridBagConstraints gbc_comboBox = new GridBagConstraints();
		gbc_comboBox.insets = new Insets(0, 0, 5, 5);
		gbc_comboBox.fill = GridBagConstraints.HORIZONTAL;
		gbc_comboBox.gridx = 2;
		gbc_comboBox.gridy = 5;
		panel_3.add(comboBox, gbc_comboBox);
		
		JLabel lblTnKho = new JLabel("T\u1ED3n kho");
		GridBagConstraints gbc_lblTnKho = new GridBagConstraints();
		gbc_lblTnKho.anchor = GridBagConstraints.EAST;
		gbc_lblTnKho.insets = new Insets(0, 0, 5, 5);
		gbc_lblTnKho.gridx = 4;
		gbc_lblTnKho.gridy = 5;
		panel_3.add(lblTnKho, gbc_lblTnKho);
		
		textField_9 = new JTextField();
		GridBagConstraints gbc_textField_9 = new GridBagConstraints();
		gbc_textField_9.insets = new Insets(0, 0, 5, 5);
		gbc_textField_9.fill = GridBagConstraints.HORIZONTAL;
		gbc_textField_9.gridx = 5;
		gbc_textField_9.gridy = 5;
		panel_3.add(textField_9, gbc_textField_9);
		textField_9.setColumns(10);
		
		JLabel lblNhCungCp = new JLabel("Nh\u00E0 cung c\u1EA5p");
		GridBagConstraints gbc_lblNhCungCp = new GridBagConstraints();
		gbc_lblNhCungCp.anchor = GridBagConstraints.EAST;
		gbc_lblNhCungCp.insets = new Insets(0, 0, 5, 5);
		gbc_lblNhCungCp.gridx = 1;
		gbc_lblNhCungCp.gridy = 6;
		panel_3.add(lblNhCungCp, gbc_lblNhCungCp);
		
		textField_3 = new JTextField();
		GridBagConstraints gbc_textField_3 = new GridBagConstraints();
		gbc_textField_3.fill = GridBagConstraints.HORIZONTAL;
		gbc_textField_3.insets = new Insets(0, 0, 5, 5);
		gbc_textField_3.gridx = 2;
		gbc_textField_3.gridy = 6;
		panel_3.add(textField_3, gbc_textField_3);
		textField_3.setColumns(10);
		
		textField_4 = new JTextField();
		GridBagConstraints gbc_textField_4 = new GridBagConstraints();
		gbc_textField_4.insets = new Insets(0, 0, 5, 5);
		gbc_textField_4.fill = GridBagConstraints.HORIZONTAL;
		gbc_textField_4.gridx = 3;
		gbc_textField_4.gridy = 6;
		panel_3.add(textField_4, gbc_textField_4);
		textField_4.setColumns(10);
		
		JCheckBox chckbxInn = new JCheckBox("In \u1EA5n");
		GridBagConstraints gbc_chckbxInn = new GridBagConstraints();
		gbc_chckbxInn.anchor = GridBagConstraints.WEST;
		gbc_chckbxInn.insets = new Insets(0, 0, 5, 5);
		gbc_chckbxInn.gridx = 2;
		gbc_chckbxInn.gridy = 7;
		panel_3.add(chckbxInn, gbc_chckbxInn);
		
		JButton btnNewButton_7 = new JButton("+");
		GridBagConstraints gbc_btnNewButton_7 = new GridBagConstraints();
		gbc_btnNewButton_7.anchor = GridBagConstraints.EAST;
		gbc_btnNewButton_7.insets = new Insets(0, 0, 5, 5);
		gbc_btnNewButton_7.gridx = 5;
		gbc_btnNewButton_7.gridy = 8;
		panel_3.add(btnNewButton_7, gbc_btnNewButton_7);
		
		JButton button = new JButton("-");
		GridBagConstraints gbc_button = new GridBagConstraints();
		gbc_button.insets = new Insets(0, 0, 5, 0);
		gbc_button.gridx = 6;
		gbc_button.gridy = 8;
		panel_3.add(button, gbc_button);
		
		JScrollPane scrollPane = new JScrollPane();
		GridBagConstraints gbc_scrollPane = new GridBagConstraints();
		gbc_scrollPane.insets = new Insets(0, 0, 0, 10);
		gbc_scrollPane.gridwidth = 6;
		gbc_scrollPane.fill = GridBagConstraints.BOTH;
		gbc_scrollPane.gridx = 1;
		gbc_scrollPane.gridy = 9;
		panel_3.add(scrollPane, gbc_scrollPane);
		
		table = new JTable();
		table.setRowHeight(20);
		scrollPane.setViewportView(table);
		table.setModel(new DefaultTableModel(
			new Object[][] {
				{null, null, null, null, null, null},
				{null, null, null, null, null, null},
				{null, null, null, null, null, null},
				{null, null, null, null, null, null},
				{null, null, null, null, null, null},
				{null, null, null, null, null, null},
				{null, null, null, null, null, null},
				{null, null, null, null, null, null},
				{null, null, null, null, null, null},
				{null, null, null, null, null, null},
			},
			new String[] {
				"M\u00E3 nguy\u00EAn li\u1EC7u", "T\u00EAn nguy\u00EAn li\u1EC7u", "\u0110VT", "S\u1ED1 l\u01B0\u1EE3ng", "\u0110\u01A1n gi\u00E1", "Th\u00E0nh ti\u1EC1n"
			}
		) {
			Class[] columnTypes = new Class[] {
				Object.class, String.class, Object.class, Object.class, Object.class, Object.class
			};
			public Class getColumnClass(int columnIndex) {
				return columnTypes[columnIndex];
			}
		});
		table.getColumnModel().getColumn(0).setPreferredWidth(84);
		table.getColumnModel().getColumn(1).setPreferredWidth(171);
		table.getColumnModel().getColumn(4).setPreferredWidth(93);
		table.getColumnModel().getColumn(5).setPreferredWidth(126);

	}

}
